import store from '@/store'

export default {
	methods: {
		checkPermission(key) {
			try {
				const { points } = store.getters.userInfo.roles
				if (points && points.length) {
					return points.some(item => item === key)
				} else {
					return false
				}
			} catch (e) {

			}
		}
	}
}
